//
//  RootViewController.m
//  QQ_Youngsher
//
//  Created by Maxwell on 16/1/14.
//  Copyright © 2016年 LLLTeam. All rights reserved.
//

#import "RootViewController.h"
#import "RootNavigationController.h"
#import "NewsViewController.h"
#import "ContactViewController.h"
#import "ZoneViewController.h"
@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    NewsViewController *nvc = [[NewsViewController alloc] init];
    RootNavigationController *rootNewsVC = [[RootNavigationController alloc] initWithRootViewController:nvc];
    rootNewsVC.tabBarItem.title = @"消息";
    UIImage *image00 = [[UIImage imageNamed:@"news_n"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    UIImage *image01 = [[UIImage imageNamed:@"news_y"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    rootNewsVC.tabBarItem.image = image00;
    rootNewsVC.tabBarItem.selectedImage = image01;
    
    ContactViewController *cvc = [[ContactViewController alloc] init];
    RootNavigationController *rootContactVC = [[RootNavigationController alloc] initWithRootViewController:cvc];
    rootContactVC.tabBarItem.title = @"联系人";
    UIImage *image10 = [[UIImage imageNamed:@"contact_n"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    UIImage *image11 = [[UIImage imageNamed:@"contact_y"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    rootContactVC.tabBarItem.image = image10;
    rootContactVC.tabBarItem.selectedImage = image11;
    
    ZoneViewController *zvc = [[ZoneViewController alloc] init];
    RootNavigationController *rootZoneVC = [[RootNavigationController alloc] initWithRootViewController:zvc];
    rootZoneVC.tabBarItem.title = @"动态";
    UIImage *image20 = [[UIImage imageNamed:@"zone_n"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    UIImage *image21 = [[UIImage imageNamed:@"zone_y"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    rootZoneVC.tabBarItem.image = image20;
    rootZoneVC.tabBarItem.selectedImage = image21;
    
    self.viewControllers = @[rootNewsVC,rootContactVC,rootZoneVC];
    self.tabBar.translucent = YES;
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
